Skip to content

winget-release: fix workflow version parsing #737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 26, 2025

Conversation

mjcheetham
Copy link
Member

When running this workflow from the release event the parsing of the tag name from the event object must happen after the object has been loaded, not before! This error eventually results in a bogus value for the $version argument that gets passed to wingetcreate. Example: microsoft/winget-pkgs@c05e696#diff-297f752772b92e600a2cba463f006d085a70a0919a5fad6b62fd8f88b135c9ee

Ensure we only access the $github variable after we've defined it.

Whilst we're in here, also drop some no longer needed parts of the script. We now use the licence URLs pointing at HEAD rather than a specific branch version. This change was made during the 2.47.0.vfs.0.3 release by this PR: microsoft/winget-pkgs#185867

We now use the licence URLs pointing at HEAD rather than a specific
branch version. This change was made during the 2.47.0.vfs.0.3 release
by this PR: microsoft/winget-pkgs#185867

The manual text replacements here are no longer needed.

Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
When running this workflow from the `release` event the parsing of the
tag name from the event object must happen _after_ the object has been
loaded, not before! This error eventually results in a bogus value for
the `$version` argument that gets passed to `wingetcreate`.

Ensure we only access the `$github` variable _after_ we've defined it.

Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
@mjcheetham mjcheetham requested a review from dscho March 26, 2025 11:22
Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@mjcheetham mjcheetham enabled auto-merge March 26, 2025 11:35
@mjcheetham mjcheetham merged commit e7bb8dc into microsoft:vfs-2.49.0 Mar 26, 2025
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants